package com.heima.feign.article;

import com.heima.model.article.pojo.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dto.WmNewsTransferDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("leadnews-article")
public interface ArticleFeign {
    @PostMapping("/article/saveArticle")
     ResponseResult<Long> saveArticle(@RequestBody WmNewsTransferDto dto);

    @GetMapping("/article/{id}")
    public ApArticle findById(@PathVariable("id") Long id);
}
